home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / share / src / ViewKit / Applications / GLX / copycmap.h.z / copycmap.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  1.2 KB  |  41 lines

  1. /*
  2.  * This file contains information used for cloning colors from
  3.  * colors from the default X colormap to a copied colormap of the
  4.  * appropriate depth for GL.  The following types determine how
  5.  * to select the colors from the X colormap.
  6.  */
  7.  
  8. #define GLXC_ABSOLUTE    0    /* use absolute pixel value */
  9. #define GLXC_NAMED    1    /* look up by name */
  10. #define GLXC_RESOURCE    2    /* lookup resource in parent widget */
  11.     
  12. /*
  13.  * An array must be passed in of the following structure type, describing
  14.  * the colors to be passed in.  The first three fields must be filled
  15.  * in for each color, with the XColor being calculated.  Based on type,
  16.  * value should be as follows:
  17.  *
  18.  *    type        value
  19.  *    GLXC_ABSOLUTE    the pixel number to copy (e.g. 5)
  20.  *    GLXC_NAMED    a color name (e.g. "red")
  21.  *    GLXC_RESOURCE    a pixel resource name (e.g. XmNbackground)
  22.  */
  23.  
  24. struct glxcColorInfo
  25. {
  26.     int type;        /* One of above types */
  27.     caddr_t value;    /* based on above types */
  28.     Colorindex *result;    /* store result in this variable */
  29.     XColor color;    /* the xcolor definition */
  30. };
  31.  
  32. #if defined(__cplusplus) || defined(c_plusplus)
  33. extern "C" {
  34. #endif
  35.  
  36. extern void CopyGlColormap(Widget, struct glxcColorInfo *, int);
  37.  
  38. #if defined(__cplusplus) || defined(c_plusplus)
  39. }
  40. #endif
  41.